<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <link rel="shortcut icon" href="images/logo W.jpg" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Work to Worker</title>
        <style>
            a:link {text-decoration:none;}  
        </style>
        <style type="text/css">
            @font-face {
                font-family: "jokerman";
                src: url('font/VIVALDII.TTF') format("truetype");
            }
            @media screen and (-webkit-min-device-pixel-ratio:0)
            {
                #fix1 { margin-top: 0px }
                #detail,#pass,#conf{margin-top: 15px}
                #gender{margin-top: 21px}
            }
            @-moz-document url-prefix()
            {
                #fix1 { margin-top: -20px }
            #detail{margin-top: 20px}
            #username, #fullname{margin-top: -2px}
            #gender{margin-top: 26px}
            }
        </style>

    </h:head>
    <h:body style="background-color:  #1A3665">
        <f:view locale="#{languageBean.locale}">

            <div style="width: 1000px;margin: auto;margin-top: 20px;background-color: white;border-radius: 10px;-moz-border-radius: 10px;padding-bottom: 50px">
                <ui:include src="headertemplate1.xhtml" />
                <h:form id="form1">    
                    <div>

                        <div style="background-color: #9CDBEF;color: black;margin-top: 30px;font-size: 20px;font-weight: bold;padding-left: 50px">
                            <h:outputText value="#{msg['global.signup']}" />
                        </div >
                        <div style="background-color: #E9E9E9;color: black;font-size: 20px;font-weight: bold;padding-left: 80px">
                            <h:outputText value="#{msg['global.Account_Infomation']}" />
                        </div>

                        <div>
                            <ul style="margin-left: 80px">
                                <li style="display: inline-block;vertical-align: top;text-align: right;width: 200px;font-weight: bold;">
                                    <ul id="username">
                                        <li style="list-style: none;"><h:outputText value="#{msg['global.username']}" /> :<font style="color: red"> *</font></li>

                                    </ul>
                                    <ul style="margin-top: 22px">
                                        <li style="list-style: none;"><h:outputText value="#{msg['global.password']}" /> :<font style="color: red"> *</font></li>

                                    </ul>
                                    <ul style="margin-top: 22px">
                                        <li style="list-style: none;"><h:outputText value="#{msg['global.Confirm_password']}" /> :<font style="color: red"> *</font></li>

                                    </ul>
                                </li>
                                <li style="display: inline-block;vertical-align: top">
                                    <ul style="margin-left: -55px">
                                        <ul>
                                            <li style="display: inline;"><h:inputText value="#{workerSignUp.acc.useName}" id="useName" required="true" requiredMessage="* Username is required" autocomplete = "off"/></li>
                                            <li style="display: inline"><h:message for="useName" style="color: red"/></li>                                        
                                        </ul>
                                        <ul id="detail">
                                            <li style="display: inline;" >
                                                <h:inputSecret value="#{workerSignUp.acc.password}" id="pass" required="true" requiredMessage="* Password is required">
                                                    <f:validator validatorId="passwordValidator" />
                                                    <f:attribute name="confirmPassword" value="#{confirmPassword}" />
                                                </h:inputSecret>
                                            </li>
                                            <li style="display: inline"><h:message for="pass" style="color: red"/></li>                                        
                                        </ul>
                                        <ul id="detail">
                                            <li style="display: inline;" >
                                                <h:inputSecret value="#{workerSignUp.confirmPass}" id="confirmPassword" required="true" binding="#{confirmPassword}" requiredMessage="* Confirm Password is required">

                                                </h:inputSecret>
                                            </li>
                                            <li style="display: inline"><h:message for="confirmPassword" style="color: red"/></li>
                                        </ul>                                    
                                    </ul>
                                </li>
                            </ul>
                        </div>
                        <div style="background-color: #E9E9E9;color: black;font-size: 20px;font-weight: bold;padding-left: 80px">
                            <h:outputText value="#{msg['global.User_Infomation']}" />
                        </div>
                        <div style="margin-left: 80px">
                            <ul>
                                <li style="display: inline-block;vertical-align: top;text-align: right;width: 200px;font-weight: bold;">
                                    <ul>
                                        <li style="list-style: none;" id="fullname"><h:outputText value="#{msg['global.Fullname']}" /> :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;" id="gender"><h:outputText value="#{msg['global.Gender']}" /> :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;margin-top: 22px"><h:outputText value="#{msg['global.phone']}" /> :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;margin-top: 22px"><h:outputText value="#{msg['global.Address']}" /> :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;margin-top: 22px">Email :<font style="color: red"> *</font></li>

                                    </ul>
                                </li>
                                <li style="display: inline-block;vertical-align: top;margin-left: -15px">
                                    <ul>
                                        <li style="display: inline"><h:inputText value="#{workerSignUp.worker.name}" id="fullname" required="true" requiredMessage="* Full name is required" autocomplete = "off" /></li>
                                        <li style="display: inline"><h:message for="fullname" style="color: red"/></li>
                                    </ul>
                                    <ul id="detail">
                                        <li style="display: inline;">
                                            <h:selectOneRadio value="#{workerSignUp.gender_temp}"  id="gender">
                                                <f:selectItem itemValue="1" itemLabel="#{msg['global.Male']}" />
                                                <f:selectItem itemValue="0" itemLabel="#{msg['global.Female']}" />
                                            </h:selectOneRadio>
                                        </li>
                                        <li style="display: inline"><h:message for="gender" style="color: red"/></li>
                                    </ul>
                                    <ul id="detail">
                                        <li style="display: inline" >
                                            <h:inputText value="#{workerSignUp.worker.phone}" id="phone" required="true" requiredMessage="* Phone is required" validatorMessage="* Phone is not valid" autocomplete = "off" >
                                                <f:validateRegex pattern="^09[0-9]{8}||^01[0-9]{9}"  />
                                            </h:inputText>
                                        </li>
                                        <li style="display: inline"><h:message for="phone" style="color: red"/></li>
                                    </ul>
                                    <ul id="detail">
                                        <li style="display: inline" ><h:inputText value="#{workerSignUp.worker.address}" required="true" requiredMessage="* Address is required" id="add" autocomplete = "off" /></li>
                                        <li style="display: inline"><h:message for="add" style="color: red"/></li>
                                    </ul>
                                    <ul id="detail">
                                        <li style="display: inline" >
                                            <h:inputText value="#{workerSignUp.worker.email}" required="true" requiredMessage="* Email is required" id="ema" validatorMessage="* Email is not valid" autocomplete = "off" >
                                                <f:validateRegex pattern="([^.@]+)(\.[^.@]+)*@([^.@]+\.)+([^.@]+)"  />
                                            </h:inputText>
                                        </li>
                                        <li style="display: inline"><h:message for="ema" style="color: red"/></li>
                                    </ul>
                                </li>
                            </ul>                        
                            <ul style="margin-top: 20px">
                                <li style="display: inline;margin-left: 140px"><h:commandButton value=
                                                                                                "#{msg['global.Submit']}" type= "submit" action="#{workerSignUp.insertWorkerSignUp()}" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" /></li>
                                <li style="display: inline;margin-left: 30px"><h:commandButton value="Reset" type=
                                                                                               "#{msg['global.Reset']}" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" /></li>
                            </ul>
                        </div>
                    </div>   
                </h:form>
            </div>
            <div style="color: white;height: 100px;border-radius: 10px;-moz-border-radius: 10px;border: 1px;border-style: solid;border-color: white;margin-top: 20px;">
                <div style="text-align: right; padding-top: 20px;padding-right: 30px">
                    Copyright © by Group 1
                    <br />
                    Project Name : Work to Worker
                    <br />
                    Member in Group : Mr Bùi Hồng Hải , Mr Nguyễn Văn Cường , Mr Nguyễn Nhất Linh , Mr Lưu Thế Thông , Mr Trần Trung Hiếu
                </div>
            </div>

        </f:view>
    </h:body>
</html>

